
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script type="text/javascript">
    var localHandler = function(data){
        alert('我是本地函数，可以被跨域的remote.js文件调用，远程js带来的数据是：' + data.result);
    };
    </script>
    
    <!-- 方法1 -->
    <!-- <script type="text/javascript" src="https://gitee.com/bkzh/web-test/raw/master/remote.js"></script> -->
    
    <!-- 方法2 -->    
    <script>
        var script = document.createElement('script');
        script.type = "text/javascript";
        script.src = 'https://gitee.com/bkzh/web-test/raw/master/remote.js';
        document.getElementsByTagName('head')[0].appendChild(script);
    </script>   
</head>
<body>

</body>
</html>
